using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace GUI
{
    public partial class MENU : Form
    {
        Sáchthưviện s;
        Độcgiả dg;
        Thẻthưviện tv;
        Mượnsách ms;
        Trảsách ts;
        Tìmkiếmsách tks;
        Tìmkiếmđộcgiả tkdg;
        Thôngtinsách tts;
        Phiếuphat pp;
        public MENU()
        {
            InitializeComponent();
            s=new Sáchthưviện();
            s.Name="sach";
            dg = new Độcgiả();
            dg.Name = "độc giả";
            tv = new Thẻthưviện();
            tv.Name = "theTV";
            ms = new Mượnsách();
            ms.Name = "muonsach";
            ts = new Trảsách();
            ts.Name = "trasach";
            tks = new Tìmkiếmsách();
            tks.Name = "timkiemsach";
            tkdg = new Tìmkiếmđộcgiả();
            tkdg.Name = "timkiemDG";
            tts = new Thôngtinsách();
            tts.Name = "Thongtinsach";
            pp = new Phiếuphat();
            pp.Name = "phieuphat";
            panel.Controls.Add(s);
            panel.Controls.Add(dg);
            panel.Controls.Add(tv);
            panel.Controls.Add(ms);
            panel.Controls.Add(ts);
            panel.Controls.Add(tks);
            panel.Controls.Add(tkdg);
            panel.Controls.Add(tts);
            panel.Controls.Add(pp);
              hideall();

        }
        

        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            hideall();
            panel.Controls["độc giả"].Visible = true;
        }
        private void hideall()
        {
            for (int i = 0; i < panel.Controls.Count; i++)
            {
                panel.Controls[i].Visible = false;
            }
        }

        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            hideall();
            panel.Controls["sach"].Visible = true;
        }

        private void toolStripButton4_Click(object sender, EventArgs e)
        {
            hideall();
            panel.Controls["theTV"].Visible = true;
        }

        private void toolStripButton5_Click(object sender, EventArgs e)
        {
            hideall();
            panel.Controls["muonsach"].Visible = true;
        }

       

        private void toolStripButton6_Click(object sender, EventArgs e)
        {
            hideall();
            panel.Controls["trasach"].Visible = true;
        }

        private void toolStripButton7_Click(object sender, EventArgs e)
        {
            hideall();
            panel.Controls["timkiemsach"].Visible = true;
        }

        private void toolStripButton8_Click(object sender, EventArgs e)
        {
            hideall();
            panel.Controls["timkiemDG"].Visible = true;
        }

        private void toolStripButton9_Click(object sender, EventArgs e)
        {
            hideall();
            panel.Controls["thongtinsach"].Visible = true;
        }

      

        private void toolStripButton10_Click(object sender, EventArgs e)
        {
            
            hideall();
            panel.Controls["phieuphat"].Visible = true;
        }

       

      
      
        
    }
}